<?php
Route::group(['namespace' => 'Agent', 'prefix' => 'agent'], function () {
    Route::get('login', 'LoginController@index')->name('agent/login');
    Route::post('login', 'LoginController@signIn');

    Route::group(['middleware' => 'agent:agent'], function () {
        Route::get('logout', 'LoginController@logout')->name('agent/logout');
        Route::get('/', 'IndexController@index')->name('agent_index');
        Route::get('index', 'IndexController@index')->name('agent_index');
		Route::post('agupload', 'IndexController@agupload')->name('agupload');
		
		Route::prefix('statis')->group(function () {
            Route::get('/', 'StatisController@index')->name('statis.index');
        });
        //邀请主播
        Route::get('invite', 'GuildController@index')->name('invite');
		//主播列表
		Route::get('ganchor', 'GuildController@ganchor')->name('ganchor');
		//主播收益记录
		Route::get('earninglist', 'GuildController@earninglist')->name('earninglist');		
		//主播收益记录导出
		Route::get('exportearning', 'GuildController@exportearning')->name('exportearning');	
		//公会信息
		Route::get('guildlist', 'GuildController@information')->name('guildlist');
		//礼物记录
        Route::get('gindex', 'ReportsController@index')->name('gindex');
        //邮票记录
        Route::get('gstamp', 'ReportsController@stamp')->name('gstamp');
        //通话记录
        Route::get('gcall', 'ReportsController@call')->name('gcall');
        //公告
        Route::get('aunnoung', 'IndexController@aunnoung')->name('aunnoung');
		//公告详情
		Route::get('aunndetails/{id}', 'IndexController@aunndetails')->name('aunndetails');


        Route::get('changePassword', 'IndexController@changePassword')->name('changePassword');//进入修改密码界面
        Route::post('editPassword', 'IndexController@editPassword');//修改密码post
        Route::post('edit_save', 'IndexController@edit_save')->name('edit_save'); //修改密码ajax
        Route::get('forbidden', 'IndexController@forbidden')->name('agent_403');
        Route::put('cache', 'IndexController@flushCache')->name('agcache.flush');
        Route::delete('cache', 'IndexController@cleanCache')->name('agcache.clean');
        Route::get('first', 'IndexController@first')->name('first');
		
        Route::get('withdraw', 'DrawController@index')->name('withdraw');//进入提现记录
        Route::get('commission', 'DrawController@commission')->name('commission');//收益提现        

        Route::get('applyadd', 'DrawController@applyAdd')->name('applyadd');//申请提现
        Route::post('applySave', 'DrawController@applySave')->name('applySave');//提现保存


        Route::get('accountlist', 'DrawController@accountlist')->name('accountlist');//提现账户绑定
        Route::post('accountcreate', 'DrawController@accountcreate')->name('accountcreate');//提现账户绑定提交

    });
    Route::get('test', 'TestController@test')->name('test');
});
